package com.zijin.exec;

import java.util.Scanner;

public class Text03 {
    public static void main(String[] args) {
        int total = 0;
        int number[] = new int[] {34,67,12,99,5};
        for (int i = 0;i < number.length;i++){
            System.out.print(number[i]+"\t");
        }
        for (int i = 0;i < number.length;i++){
            total += number[i];
        }
        System.out.println("数列中所有数的和为"+total);
        Scanner input = new Scanner(System.in);
        System.out.println("请猜一个数字");
        int guessNumber =input.nextInt();
        for (int i = 0;i < number.length;i++){
            if(guessNumber == number[i]){
                System.out.println("这个数字在数组中");
            }
        }
    }
}
